<template>
  <div>b{{ dattb }}
      <button @click="transfer">b传值给a</button>
  </div>
</template>a

<script>
import eventbus from '@/common/eventbus.js'
export default {
  data () {
    return {
      dattb: '我是b组件的数据'
    }
  },
  methods: {
    transfer () {
      eventbus.$emit('fff', this.dattb)
    }
  }
}
</script>

<style>
</style>
